package com.bilubi.reggie.reggie.service.Impl;

import com.bilubi.reggie.reggie.bean.Employee;
import com.bilubi.reggie.reggie.mapper.EmployeeMapper;
import com.bilubi.reggie.reggie.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    public Employee getEmployeeByUsername(Employee employee) {
        return employeeMapper.getEmployeeByUsername(employee);
    }

    @Override
    public Employee getEmployeeById(Long id) {
        return employeeMapper.getEmployeeById(id);
    }

    @Override
    public List<Employee> getAllEmployees(String name) {
        return employeeMapper.getAllEmployees(name);
    }

    @Override
    public Integer addEmployee(Employee employee) {
        return employeeMapper.addEmployee(employee);
    }

    @Override
    public Integer updateEmployee(Employee employee) {
        return employeeMapper.updateEmployee(employee);
    }

}
